package com.huawei.appgallery.forum.cards.card;

import android.content.Context;
import android.view.View;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import o.azb;
import o.bsy.c;
import o.bsy.e;
import o.cgz;
import o.epv;

public class ForumHorizonListItemCard extends ForumFollowCard {
    private View ˋ;
    private RelativeLayout ॱ;

    public ForumHorizonListItemCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        this.ˋ = view.findViewById(c.ᐨ);
        this.ॱ = (RelativeLayout) view.findViewById(c.ꓸ);
        super.ˏ(view);
        LayoutParams layoutParams = (LayoutParams) this.ॱ.getLayoutParams();
        layoutParams.setMarginEnd(ᐝ());
        this.ॱ.setLayoutParams(layoutParams);
        this.ॱ.setOnClickListener(this);
        this.ॱ.setPaddingRelative(0, 0, 0, 0);
        return this;
    }

    private int ᐝ() {
        if (epv.ˏॱ(this.ʼॱ)) {
            return this.ʼॱ.getResources().getDimensionPixelSize(e.ˎ);
        }
        if (epv.ʼ(this.ʼॱ)) {
            return this.ʼॱ.getResources().getDimensionPixelSize(e.ˋ);
        }
        return this.ʼॱ.getResources().getDimensionPixelSize(e.ˎ);
    }

    protected void ˎ() {
        azb.ˋ(this.ˋ, azb.ˊ(this.ʼॱ) + this.ʼॱ.getResources().getDimensionPixelSize(e.ˏ), ᐝ());
    }
}
